<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        // var obj = {
        //     x:20,
        //     y:30,
        //     z:40
        // }

        /*
            var key in obj - > 声明一个key变量用于代表obj里面的key
            for(var key in obj){}
        */
        // for(var v in obj ){
        //     // console.log(v);
        //     console.log(obj[v]);
        // }

        var arr = [10,20,30,40];

        for(var v in arr){
            // console.log(v);
            console.log(arr[v]); 
        }
    </script>
</body>
</html>